$feature-upsell-break-at: '1040px';

@mixin feature-upsell-card {
	display: flex;
	margin: 0;
	padding: 45px 55px;
	color: inherit;
	box-shadow: 0 0 0 1px rgba( 200, 215, 225, 0.5 ), 0 1px 2px #e9eff3;
	box-sizing: border-box;
	background-color: white;
}

.feature-upsell__main {
	max-width: 960px;
	margin-top: 48px;
	color: var( --color-neutral-70 );
}

.feature-upsell__placeholder {
	animation: pulse-light 800ms ease-in-out infinite;
	background: var( --color-neutral-10 );

	&.is-cta {
		width: 350px;
		max-width: 80%;
		height: 50px;
		//margin: 0 auto;
	}

	&.is-cover {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
}

.feature-upsell__header-title {
	font-size: 36px;
	line-height: 1.1;
	font-weight: 400;
	margin-top: 40px;
	margin-bottom: 15px;
	text-align: center;

	@include breakpoint( '<1280px' ) {
		font-size: 30px;
	}

	@include breakpoint( '<660px' ) {
		font-size: 26px;
	}
}

.feature-upsell__header-section {
	font-size: 32px;
	line-height: 1;
	font-weight: 400;
	margin-top: 40px;
	margin-bottom: 15px;
	text-align: center;

	@include breakpoint( '<1280px' ) {
		font-size: 28px;
	}

	@include breakpoint( '<660px' ) {
		font-size: 24px;
	}

	&.is-bold {
		font-weight: 500;
	}

	&.is-left {
		text-align: left;
	}

	&.is-h4 {
		font-size: 20px;
		@include breakpoint( '<1280px' ) {
			&.is-h4 {
				font-size: 18px;
			}
		}

		//@include breakpoint( '<660px' ) {
		//	&.is-h4 {
		//		font-size: 16px;
		//	}
		//}
	}
}

.feature-upsell__cta {
	line-height: 1.6;

	&-pitch {
		margin: 0;
	}

	&-button {
		display: block;
		font-size: 16px;
		padding: 14px 48px;
		line-height: 1.2;

		@include breakpoint( '<1280px' ) {
			font-size: 20px;
		}

		@include breakpoint( '<660px' ) {
			font-size: 18px;
		}
	}

	&-guarantee {
		display: block;
		opacity: 0.8;
		color: var( --studio-jetpack-green-30 );
		font-size: 15px;
		line-height: 31px;
		font-weight: 300;
	}

	&.is-centered {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	&.is-large-gap {
		margin-top: 40px;
		margin-bottom: 40px;
	}

	&.is-in-video-box {
		margin-top: 30px;
		.feature-upsell__cta-button {
			margin: 20px 0 0;
			@include breakpoint( '<1280px' ) {
				margin-left: auto;
				margin-right: auto;
			}
		}
		.feature-upsell__cta-guarantee {
			margin-top: 8px;
			@include breakpoint( '<1280px' ) {
				text-align: center;
			}
		}
	}

	&.is-in-benefit {
		display: flex;
		flex-flow: row wrap;

		.feature-upsell__cta-pitch {
			flex-basis: calc( 100% - 250px );
			order: 1;
			line-height: 1.25;
			font-size: 26px;
			font-weight: 300;
			padding-right: 30px;
			@include breakpoint( '<1280px' ) {
				font-size: 22px;
			}
		}
		.feature-upsell__cta-button {
			flex-basis: 220px;
			align-self: center;
			order: 2;
			margin: 0;
		}
		.feature-upsell__cta-guarantee {
			flex-basis: 100%;
			order: 3;
			margin-top: 10px;
		}

		@include breakpoint( '<1040px' ) {
			text-align: center;

			.feature-upsell__cta-pitch {
				flex-basis: 100%;
				padding-right: 0;
			}

			.feature-upsell__cta-button {
				margin: 10px auto 0;
			}

			.feature-upsell__cta-guarantee {
				margin-top: 5px;
			}
		}
	}
}

.feature-upsell__card {
	@include feature-upsell-card();
	display: block;
	margin-bottom: 20px;

	&-header.is-capital {
		font-size: 36px;
		line-height: 1.1;
		font-weight: 400;
		margin-bottom: 20px;

		@include breakpoint( '<1280px' ) {
			font-size: 30px;
		}

		@include breakpoint( '<660px' ) {
			font-size: 26px;
		}
	}

	&-header.is-title {
		font-size: 24px;
		color: var( --color-neutral-60 );
		margin-bottom: 20px;
		@include breakpoint( '<1280px' ) {
			font-size: 20px;
		}
	}

	&-header.is-sub {
		font-size: 21px;
		font-weight: 300;
		color: var( --color-neutral-60 );
		margin-bottom: 20px;
		@include breakpoint( '<1280px' ) {
			font-size: 18px;
		}
	}

	&-header.is-main {
		font-weight: 600;
	}

	&-content {
		font-size: 16px;
		line-height: 1.625;
		margin-top: 20px;
		@include breakpoint( '<660px' ) {
			margin-top: 15px;
		}

		> :first-child {
			margin-top: 0;
		}

		> :last-child {
			margin-bottom: 0;
		}
	}
}

.feature-upsell__video {
	&-box {
		@include feature-upsell-card;
		flex-flow: row wrap;
	}

	&-container {
		flex: 1;
		position: relative;
		overflow: hidden;
		padding-top: 27.25%;
		margin: 0 auto;
		@include breakpoint( '<1280px' ) {
			flex-basis: 100%;
			padding-top: 41%;
		}
	}

	&-frame {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border: 0;
		iframe {
			position: relative;
			z-index: 10;
		}
	}

	&-description {
		flex: 0;
		flex-basis: 340px;
		margin-left: 32px;
		font-size: 16px;
		line-height: 1.625;

		@include breakpoint( '<1280px' ) {
			flex-basis: 100%;
			margin-top: 20px;
			margin-left: 0;
		}

		.feature-upsell__cta {
			margin-top: 22px;
		}
	}
}

.feature-upsell__benefits-list {
	padding: 0;
	margin: 0;
	list-style-type: decimal;

	&-item {
		@include feature-upsell-card;

		@include breakpoint( '<#{$feature-upsell-break-at}' ) {
			flex-flow: row wrap;
			margin-bottom: 20px;
		}

		@include breakpoint( '>#{$feature-upsell-break-at}' ) {
			&.is-enable-wordads {
				.feature-upsell__benefits-list-image-wrapper {
					width: 160px;
					margin-left: 65px;
				}
			}
		}
	}

	&-item-content {
		order: 2;
		flex: 1;
		width: 100%;
		display: flex;
		flex-flow: column;
		@include breakpoint( '<#{$feature-upsell-break-at}' ) {
			flex-basis: 90%;
		}
	}

	&-name {
		font-size: 24px;
		font-weight: 600;
		color: var( --color-neutral-60 );
		@include breakpoint( '<1280px' ) {
			font-size: 20px;
		}
	}

	&-description {
		font-size: 16px;
		line-height: 1.625;
		margin-top: 10px;
		@include breakpoint( '<660px' ) {
			margin-top: 15px;
		}
	}

	&-image-wrapper {
		order: 3;
		width: 180px;
		max-width: 40%;
		margin-left: 45px;

		@include breakpoint( '<#{$feature-upsell-break-at}' ) {
			order: 1;
			flex-basis: 100%;
			max-width: 30%;
			margin: 0 auto 20px 0;
		}

		//@include breakpoint( '<660px' ) {
		//	max-width: 90%;
		//}
	}

	&-image {
		width: 100%;
	}
}

.feature-upsell__text-content {
	@include breakpoint( '<660px' ) {
		padding: 0 2em;
	}
}

.feature-upsell__checklist {
	display: block;
	width: 100%;
	text-align: left;
	margin: 0 0 1.5em;
	padding: 0;
	list-style-type: none;

	&-item {
		display: flex;
		width: 100%;
		list-style-type: none;
		align-items: center;
		margin-bottom: 8px;

		@include breakpoint( '<660px' ) {
			align-items: flex-start;
		}
	}

	&-item-icon {
		fill: var( --color-primary );
		margin-right: 11px;
	}

	&-item-text {
		flex: 1;
	}
}

.feature-upsell__refund-asterisk {
	position: relative;
	margin-top: 15px;
	padding-left: 20px;
	font-size: 13px;
	line-height: 1.2;
	color: var( --color-neutral-50 );

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		display: block;
		width: 20px;
		content: '*';
		text-align: center;
	}

	p {
		margin: 15px 0;
	}
}

.feature-upsell__features-list {
	@include breakpoint( '>1040px' ) {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	&-item {
		page-break-inside: avoid; // For Firefox
		break-inside: avoid-column; // For IE
		-webkit-column-break-inside: avoid; // For others

		padding-bottom: 28px;
		max-width: 150%;
		/*
		 * Hack for IE 11 - max-width is in place to limit constraints but it still
		 * needs an explicit rule for width
		 */
		width: 100%;

		@include breakpoint( '>1040px' ) {
			max-width: calc( 100% / 2 - 10px );
		}
	}

	&.is-full-size {
		.feature-upsell__features-list-item {
			width: 100%;
			max-width: 100%;
		}
	}
}

.feature-upsell__feature {
	height: 100%;
	color: inherit;

	&-content {
		@include feature-upsell-card;
		display: block;
		height: 100%;
		padding: 33px 48px 28px 43px;
	}

	&-text {
		width: 100%;
		flex-grow: 1;
	}

	&-title {
		font-weight: 600;
		font-size: 21px;
		line-height: 1.5;
		color: var( --color-neutral-60 );
		clear: none;
		margin-top: 10px;
	}

	&-description {
		font-size: 14px;
		line-height: 1.6;
		margin: 11px 0 0;

		@include breakpoint( '<1040px' ) {
			font-size: 16px;
		}
	}

	&-icon {
		display: block;
		width: 48px;
		height: 48px;
		margin: 0;
		padding: 11px 14px;
		border-radius: 100px;
		background: var( --color-neutral-60 );
		color: #fff;
	}

	.purchase-detail__info {
		margin-left: 0;
	}
}
